<?php
require_once 'common.inc.php';
!in_array('2', $larr) && adminmsg('你没有被赋予操作该项的权限！');

$matches = parse_url($_SERVER['HTTP_REFERER']);
if ('show' == $action) {
	$filename = "../push/log/keyword.php";
	$str = file_get_contents($filename);
	$str = explode(',', $str);

	include_once MCC_ROOT . '/templates/msystem/keywordsit.htm';
} elseif ('set' == $action) {
	$str[0] = $status;
	empty($num)?$str[1] = 0:$str[1] = $num;
	$str = implode(',', $str);
	$filename = "../push/log/keyword.php";
	$fp = fopen($filename, 'wb+');
	if ($fp) {
		fwrite($fp, $str);
		fclose($fp);
	} 
	adminmsg('关键字设置成功', "keyword.inc.php?action=show");
} 

?>